-- GENERATED SPELL FOR [Captain Vachon] --


function spell0_1664(pUnit, Event) --@Defensive Stance,Self--
pUnit:FullCastSpellOnTarget(7164,pUnit)
pUnit:RegisterEvent('Sorts_1664', 593, 1)
end

function spell1_1664(pUnit, Event) --@Improved Blocking,Self--
pUnit:FullCastSpellOnTarget(3248,pUnit)
pUnit:RegisterEvent('Sorts_1664', 6311, 1)
end

function spell2_1664(pUnit, Event) --@Shield Bash,n/a--
pUnit:FullCastSpellOnTarget(72,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_1664', 6000, 1)
end

function Sorts_1664(pUnit, Event)
local choix_sorts_1664 = math.random(0, 2)
if choix_sorts_1664 == 0 then
pUnit:RegisterEvent('spell0_1664', 1, 1)
end
if choix_sorts_1664 == 1 then
pUnit:RegisterEvent('spell1_1664', 1, 1)
end
if choix_sorts_1664 == 2 then
pUnit:RegisterEvent('spell2_1664', 1, 1)
end
end

function mob1664_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_1664', math.random(1500, 3000), 1)
end

function mob1664_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob1664_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob1664_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(1664, 1, 'mob1664_Action')
RegisterUnitEvent(1664, 2, 'mob1664_Leave')
RegisterUnitEvent(1664, 3, 'mob1664_Kill')
RegisterUnitEvent(1664, 4, 'mob1664_Die')
